\(\int \sin ^3(a+b x) \sin ^2(c+d x) \, dx\) [207]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [B] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 17, antiderivative size = 138 \[ \int \sin ^3(a+b x) \sin ^2(c+d x) \, dx=-\frac {3 \cos (a+b x)}{8 b}+\frac {\cos (3 a+3 b x)}{24 b}+\frac {3 \cos (a-2 c+(b-2 d) x)}{16 (b-2 d)}-\frac {\cos (3 a-2 c+(3 b-2 d) x)}{16 (3 b-2 d)}+\frac {3 \cos (a+2 c+(b+2 d) x)}{16 (b+2 d)}-\frac {\cos (3 a+2 c+(3 b+2 d) x)}{16 (3 b+2 d)} \]

[Out]

-3/8*cos(b*x+a)/b+1/24*cos(3*b*x+3*a)/b+3/16*cos(a-2*c+(b-2*d)*x)/(b-2*d)-1/16*cos(3*a-2*c+(3*b-2*d)*x)/(3*b-2
*d)+3/16*cos(a+2*c+(b+2*d)*x)/(b+2*d)-1/16*cos(3*a+2*c+(3*b+2*d)*x)/(3*b+2*d)

Rubi [A] (verified)

Time = 0.12 (sec) , antiderivative size = 138, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {4665, 2718} \[ \int \sin ^3(a+b x) \sin ^2(c+d x) \, dx=\frac {3 \cos (a+x (b-2 d)-2 c)}{16 (b-2 d)}-\frac {\cos (3 a+x (3 b-2 d)-2 c)}{16 (3 b-2 d)}+\frac {3 \cos (a+x (b+2 d)+2 c)}{16 (b+2 d)}-\frac {\cos (3 a+x (3 b+2 d)+2 c)}{16 (3 b+2 d)}-\frac {3 \cos (a+b x)}{8 b}+\frac {\cos (3 a+3 b x)}{24 b} \]

[In]

Int[Sin[a + b*x]^3*Sin[c + d*x]^2,x]

[Out]

(-3*Cos[a + b*x])/(8*b) + Cos[3*a + 3*b*x]/(24*b) + (3*Cos[a - 2*c + (b - 2*d)*x])/(16*(b - 2*d)) - Cos[3*a -
2*c + (3*b - 2*d)*x]/(16*(3*b - 2*d)) + (3*Cos[a + 2*c + (b + 2*d)*x])/(16*(b + 2*d)) - Cos[3*a + 2*c + (3*b +
 2*d)*x]/(16*(3*b + 2*d))

Rule 2718

Int[sin[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Cos[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 4665

Int[Sin[v_]^(p_.)*Sin[w_]^(q_.), x_Symbol] :> Int[ExpandTrigReduce[Sin[v]^p*Sin[w]^q, x], x] /; ((PolynomialQ[
v, x] && PolynomialQ[w, x]) || (BinomialQ[{v, w}, x] && IndependentQ[Cancel[v/w], x])) && IGtQ[p, 0] && IGtQ[q
, 0]

Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {3}{8} \sin (a+b x)-\frac {1}{8} \sin (3 a+3 b x)-\frac {3}{16} \sin (a-2 c+(b-2 d) x)+\frac {1}{16} \sin (3 a-2 c+(3 b-2 d) x)-\frac {3}{16} \sin (a+2 c+(b+2 d) x)+\frac {1}{16} \sin (3 a+2 c+(3 b+2 d) x)\right ) \, dx \\ & = \frac {1}{16} \int \sin (3 a-2 c+(3 b-2 d) x) \, dx+\frac {1}{16} \int \sin (3 a+2 c+(3 b+2 d) x) \, dx-\frac {1}{8} \int \sin (3 a+3 b x) \, dx-\frac {3}{16} \int \sin (a-2 c+(b-2 d) x) \, dx-\frac {3}{16} \int \sin (a+2 c+(b+2 d) x) \, dx+\frac {3}{8} \int \sin (a+b x) \, dx \\ & = -\frac {3 \cos (a+b x)}{8 b}+\frac {\cos (3 a+3 b x)}{24 b}+\frac {3 \cos (a-2 c+(b-2 d) x)}{16 (b-2 d)}-\frac {\cos (3 a-2 c+(3 b-2 d) x)}{16 (3 b-2 d)}+\frac {3 \cos (a+2 c+(b+2 d) x)}{16 (b+2 d)}-\frac {\cos (3 a+2 c+(3 b+2 d) x)}{16 (3 b+2 d)} \\ \end{align*}

Mathematica [A] (verified)

Time = 1.74 (sec) , antiderivative size = 153, normalized size of antiderivative = 1.11 \[ \int \sin ^3(a+b x) \sin ^2(c+d x) \, dx=\frac {1}{48} \left (-\frac {18 \cos (a) \cos (b x)}{b}+\frac {2 \cos (3 a) \cos (3 b x)}{b}+\frac {9 \cos (a-2 c+b x-2 d x)}{b-2 d}-\frac {3 \cos (3 a-2 c+3 b x-2 d x)}{3 b-2 d}+\frac {9 \cos (a+2 c+b x+2 d x)}{b+2 d}-\frac {3 \cos (3 a+2 c+3 b x+2 d x)}{3 b+2 d}+\frac {18 \sin (a) \sin (b x)}{b}-\frac {2 \sin (3 a) \sin (3 b x)}{b}\right ) \]

[In]

Integrate[Sin[a + b*x]^3*Sin[c + d*x]^2,x]

[Out]

((-18*Cos[a]*Cos[b*x])/b + (2*Cos[3*a]*Cos[3*b*x])/b + (9*Cos[a - 2*c + b*x - 2*d*x])/(b - 2*d) - (3*Cos[3*a -
 2*c + 3*b*x - 2*d*x])/(3*b - 2*d) + (9*Cos[a + 2*c + b*x + 2*d*x])/(b + 2*d) - (3*Cos[3*a + 2*c + 3*b*x + 2*d
*x])/(3*b + 2*d) + (18*Sin[a]*Sin[b*x])/b - (2*Sin[3*a]*Sin[3*b*x])/b)/48

Maple [A] (verified)

Time = 1.63 (sec) , antiderivative size = 127, normalized size of antiderivative = 0.92

method result size
default \(-\frac {3 \cos \left (x b +a \right )}{8 b}+\frac {\cos \left (3 x b +3 a \right )}{24 b}+\frac {3 \cos \left (a -2 c +\left (b -2 d \right ) x \right )}{16 \left (b -2 d \right )}-\frac {\cos \left (3 a -2 c +\left (3 b -2 d \right ) x \right )}{16 \left (3 b -2 d \right )}+\frac {3 \cos \left (a +2 c +\left (b +2 d \right ) x \right )}{16 \left (b +2 d \right )}-\frac {\cos \left (3 a +2 c +\left (3 b +2 d \right ) x \right )}{16 \left (3 b +2 d \right )}\) \(127\)
parallelrisch \(\frac {-9 \left (b +\frac {2 d}{3}\right ) b \left (b -2 d \right ) \left (b +2 d \right ) \cos \left (3 a -2 c +\left (3 b -2 d \right ) x \right )-9 b \left (b -2 d \right ) \left (b +2 d \right ) \left (b -\frac {2 d}{3}\right ) \cos \left (3 a +2 c +\left (3 b +2 d \right ) x \right )+81 \left (b +\frac {2 d}{3}\right ) b \left (b +2 d \right ) \left (b -\frac {2 d}{3}\right ) \cos \left (a -2 c +\left (b -2 d \right ) x \right )+81 \left (b +\frac {2 d}{3}\right ) b \left (b -2 d \right ) \left (b -\frac {2 d}{3}\right ) \cos \left (a +2 c +\left (b +2 d \right ) x \right )+\left (18 b^{4}-80 b^{2} d^{2}+32 d^{4}\right ) \cos \left (3 x b +3 a \right )+\left (-162 b^{4}+720 b^{2} d^{2}-288 d^{4}\right ) \cos \left (x b +a \right )+640 b^{2} d^{2}-256 d^{4}}{432 b^{5}-1920 b^{3} d^{2}+768 b \,d^{4}}\) \(225\)
risch \(-\frac {3 \cos \left (x b +a \right )}{8 b}+\frac {27 \cos \left (x b -2 d x +a -2 c \right ) b^{3}}{16 \left (b +2 d \right ) \left (3 b +2 d \right ) \left (3 b -2 d \right ) \left (b -2 d \right )}+\frac {27 \cos \left (x b -2 d x +a -2 c \right ) b^{2} d}{8 \left (b +2 d \right ) \left (3 b +2 d \right ) \left (3 b -2 d \right ) \left (b -2 d \right )}-\frac {3 \cos \left (x b -2 d x +a -2 c \right ) b \,d^{2}}{4 \left (b +2 d \right ) \left (3 b +2 d \right ) \left (3 b -2 d \right ) \left (b -2 d \right )}-\frac {3 \cos \left (x b -2 d x +a -2 c \right ) d^{3}}{2 \left (b +2 d \right ) \left (3 b +2 d \right ) \left (3 b -2 d \right ) \left (b -2 d \right )}+\frac {27 \cos \left (x b +2 d x +a +2 c \right ) b^{3}}{16 \left (b +2 d \right ) \left (3 b +2 d \right ) \left (3 b -2 d \right ) \left (b -2 d \right )}-\frac {27 \cos \left (x b +2 d x +a +2 c \right ) b^{2} d}{8 \left (b +2 d \right ) \left (3 b +2 d \right ) \left (3 b -2 d \right ) \left (b -2 d \right )}-\frac {3 \cos \left (x b +2 d x +a +2 c \right ) b \,d^{2}}{4 \left (b +2 d \right ) \left (3 b +2 d \right ) \left (3 b -2 d \right ) \left (b -2 d \right )}+\frac {3 \cos \left (x b +2 d x +a +2 c \right ) d^{3}}{2 \left (b +2 d \right ) \left (3 b +2 d \right ) \left (3 b -2 d \right ) \left (b -2 d \right )}-\frac {3 \cos \left (3 x b -2 d x +3 a -2 c \right ) b^{3}}{16 \left (b +2 d \right ) \left (3 b +2 d \right ) \left (3 b -2 d \right ) \left (b -2 d \right )}-\frac {\cos \left (3 x b -2 d x +3 a -2 c \right ) b^{2} d}{8 \left (b +2 d \right ) \left (3 b +2 d \right ) \left (3 b -2 d \right ) \left (b -2 d \right )}+\frac {3 \cos \left (3 x b -2 d x +3 a -2 c \right ) b \,d^{2}}{4 \left (b +2 d \right ) \left (3 b +2 d \right ) \left (3 b -2 d \right ) \left (b -2 d \right )}+\frac {\cos \left (3 x b -2 d x +3 a -2 c \right ) d^{3}}{2 \left (b +2 d \right ) \left (3 b +2 d \right ) \left (3 b -2 d \right ) \left (b -2 d \right )}-\frac {3 \cos \left (3 x b +2 d x +3 a +2 c \right ) b^{3}}{16 \left (b +2 d \right ) \left (3 b +2 d \right ) \left (3 b -2 d \right ) \left (b -2 d \right )}+\frac {\cos \left (3 x b +2 d x +3 a +2 c \right ) b^{2} d}{8 \left (b +2 d \right ) \left (3 b +2 d \right ) \left (3 b -2 d \right ) \left (b -2 d \right )}+\frac {3 \cos \left (3 x b +2 d x +3 a +2 c \right ) b \,d^{2}}{4 \left (b +2 d \right ) \left (3 b +2 d \right ) \left (3 b -2 d \right ) \left (b -2 d \right )}-\frac {\cos \left (3 x b +2 d x +3 a +2 c \right ) d^{3}}{2 \left (b +2 d \right ) \left (3 b +2 d \right ) \left (3 b -2 d \right ) \left (b -2 d \right )}+\frac {\cos \left (3 x b +3 a \right )}{24 b}\) \(859\)

[In]

int(sin(b*x+a)^3*sin(d*x+c)^2,x,method=_RETURNVERBOSE)

[Out]

-3/8*cos(b*x+a)/b+1/24*cos(3*b*x+3*a)/b+3/16*cos(a-2*c+(b-2*d)*x)/(b-2*d)-1/16*cos(3*a-2*c+(3*b-2*d)*x)/(3*b-2
*d)+3/16*cos(a+2*c+(b+2*d)*x)/(b+2*d)-1/16*cos(3*a+2*c+(3*b+2*d)*x)/(3*b+2*d)

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 189, normalized size of antiderivative = 1.37 \[ \int \sin ^3(a+b x) \sin ^2(c+d x) \, dx=\frac {{\left (9 \, b^{4} - 38 \, b^{2} d^{2} + 8 \, d^{4}\right )} \cos \left (b x + a\right )^{3} + 6 \, {\left (7 \, b^{3} d - 4 \, b d^{3} - {\left (b^{3} d - 4 \, b d^{3}\right )} \cos \left (b x + a\right )^{2}\right )} \cos \left (d x + c\right ) \sin \left (b x + a\right ) \sin \left (d x + c\right ) - 9 \, {\left ({\left (b^{4} - 4 \, b^{2} d^{2}\right )} \cos \left (b x + a\right )^{3} - {\left (3 \, b^{4} - 4 \, b^{2} d^{2}\right )} \cos \left (b x + a\right )\right )} \cos \left (d x + c\right )^{2} - 3 \, {\left (9 \, b^{4} - 26 \, b^{2} d^{2} + 8 \, d^{4}\right )} \cos \left (b x + a\right )}{3 \, {\left (9 \, b^{5} - 40 \, b^{3} d^{2} + 16 \, b d^{4}\right )}} \]

[In]

integrate(sin(b*x+a)^3*sin(d*x+c)^2,x, algorithm="fricas")

[Out]

1/3*((9*b^4 - 38*b^2*d^2 + 8*d^4)*cos(b*x + a)^3 + 6*(7*b^3*d - 4*b*d^3 - (b^3*d - 4*b*d^3)*cos(b*x + a)^2)*co
s(d*x + c)*sin(b*x + a)*sin(d*x + c) - 9*((b^4 - 4*b^2*d^2)*cos(b*x + a)^3 - (3*b^4 - 4*b^2*d^2)*cos(b*x + a))
*cos(d*x + c)^2 - 3*(9*b^4 - 26*b^2*d^2 + 8*d^4)*cos(b*x + a))/(9*b^5 - 40*b^3*d^2 + 16*b*d^4)

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 2030 vs. \(2 (116) = 232\).

Time = 6.37 (sec) , antiderivative size = 2030, normalized size of antiderivative = 14.71 \[ \int \sin ^3(a+b x) \sin ^2(c+d x) \, dx=\text {Too large to display} \]

[In]

integrate(sin(b*x+a)**3*sin(d*x+c)**2,x)

[Out]

Piecewise((x*sin(a)**3*sin(c)**2, Eq(b, 0) & Eq(d, 0)), ((x*sin(c + d*x)**2/2 + x*cos(c + d*x)**2/2 - sin(c +
d*x)*cos(c + d*x)/(2*d))*sin(a)**3, Eq(b, 0)), (3*x*sin(a - 2*d*x)**3*sin(c + d*x)**2/16 - 3*x*sin(a - 2*d*x)*
*3*cos(c + d*x)**2/16 - 3*x*sin(a - 2*d*x)**2*sin(c + d*x)*cos(a - 2*d*x)*cos(c + d*x)/8 + 3*x*sin(a - 2*d*x)*
sin(c + d*x)**2*cos(a - 2*d*x)**2/16 - 3*x*sin(a - 2*d*x)*cos(a - 2*d*x)**2*cos(c + d*x)**2/16 - 3*x*sin(c + d
*x)*cos(a - 2*d*x)**3*cos(c + d*x)/8 - 13*sin(a - 2*d*x)**3*sin(c + d*x)*cos(c + d*x)/(16*d) + sin(a - 2*d*x)*
*2*cos(a - 2*d*x)*cos(c + d*x)**2/(2*d) - 7*sin(a - 2*d*x)*sin(c + d*x)*cos(a - 2*d*x)**2*cos(c + d*x)/(8*d) -
 17*sin(c + d*x)**2*cos(a - 2*d*x)**3/(96*d) + 49*cos(a - 2*d*x)**3*cos(c + d*x)**2/(96*d), Eq(b, -2*d)), (x*s
in(a - 2*d*x/3)**3*sin(c + d*x)**2/16 - x*sin(a - 2*d*x/3)**3*cos(c + d*x)**2/16 - 3*x*sin(a - 2*d*x/3)**2*sin
(c + d*x)*cos(a - 2*d*x/3)*cos(c + d*x)/8 - 3*x*sin(a - 2*d*x/3)*sin(c + d*x)**2*cos(a - 2*d*x/3)**2/16 + 3*x*
sin(a - 2*d*x/3)*cos(a - 2*d*x/3)**2*cos(c + d*x)**2/16 + x*sin(c + d*x)*cos(a - 2*d*x/3)**3*cos(c + d*x)/8 -
15*sin(a - 2*d*x/3)**3*sin(c + d*x)*cos(c + d*x)/(16*d) + 3*sin(a - 2*d*x/3)**2*cos(a - 2*d*x/3)*cos(c + d*x)*
*2/(2*d) + 9*sin(a - 2*d*x/3)*sin(c + d*x)*cos(a - 2*d*x/3)**2*cos(c + d*x)/(8*d) + 21*sin(c + d*x)**2*cos(a -
 2*d*x/3)**3/(32*d) + 11*cos(a - 2*d*x/3)**3*cos(c + d*x)**2/(32*d), Eq(b, -2*d/3)), (x*sin(a + 2*d*x/3)**3*si
n(c + d*x)**2/16 - x*sin(a + 2*d*x/3)**3*cos(c + d*x)**2/16 + 3*x*sin(a + 2*d*x/3)**2*sin(c + d*x)*cos(a + 2*d
*x/3)*cos(c + d*x)/8 - 3*x*sin(a + 2*d*x/3)*sin(c + d*x)**2*cos(a + 2*d*x/3)**2/16 + 3*x*sin(a + 2*d*x/3)*cos(
a + 2*d*x/3)**2*cos(c + d*x)**2/16 - x*sin(c + d*x)*cos(a + 2*d*x/3)**3*cos(c + d*x)/8 - 15*sin(a + 2*d*x/3)**
3*sin(c + d*x)*cos(c + d*x)/(16*d) - 3*sin(a + 2*d*x/3)**2*cos(a + 2*d*x/3)*cos(c + d*x)**2/(2*d) + 9*sin(a +
2*d*x/3)*sin(c + d*x)*cos(a + 2*d*x/3)**2*cos(c + d*x)/(8*d) - 21*sin(c + d*x)**2*cos(a + 2*d*x/3)**3/(32*d) -
 11*cos(a + 2*d*x/3)**3*cos(c + d*x)**2/(32*d), Eq(b, 2*d/3)), (3*x*sin(a + 2*d*x)**3*sin(c + d*x)**2/16 - 3*x
*sin(a + 2*d*x)**3*cos(c + d*x)**2/16 + 3*x*sin(a + 2*d*x)**2*sin(c + d*x)*cos(a + 2*d*x)*cos(c + d*x)/8 + 3*x
*sin(a + 2*d*x)*sin(c + d*x)**2*cos(a + 2*d*x)**2/16 - 3*x*sin(a + 2*d*x)*cos(a + 2*d*x)**2*cos(c + d*x)**2/16
 + 3*x*sin(c + d*x)*cos(a + 2*d*x)**3*cos(c + d*x)/8 - 13*sin(a + 2*d*x)**3*sin(c + d*x)*cos(c + d*x)/(16*d) -
 sin(a + 2*d*x)**2*cos(a + 2*d*x)*cos(c + d*x)**2/(2*d) - 7*sin(a + 2*d*x)*sin(c + d*x)*cos(a + 2*d*x)**2*cos(
c + d*x)/(8*d) + 17*sin(c + d*x)**2*cos(a + 2*d*x)**3/(96*d) - 49*cos(a + 2*d*x)**3*cos(c + d*x)**2/(96*d), Eq
(b, 2*d)), (-27*b**4*sin(a + b*x)**2*sin(c + d*x)**2*cos(a + b*x)/(27*b**5 - 120*b**3*d**2 + 48*b*d**4) - 18*b
**4*sin(c + d*x)**2*cos(a + b*x)**3/(27*b**5 - 120*b**3*d**2 + 48*b*d**4) + 42*b**3*d*sin(a + b*x)**3*sin(c +
d*x)*cos(c + d*x)/(27*b**5 - 120*b**3*d**2 + 48*b*d**4) + 36*b**3*d*sin(a + b*x)*sin(c + d*x)*cos(a + b*x)**2*
cos(c + d*x)/(27*b**5 - 120*b**3*d**2 + 48*b*d**4) + 78*b**2*d**2*sin(a + b*x)**2*sin(c + d*x)**2*cos(a + b*x)
/(27*b**5 - 120*b**3*d**2 + 48*b*d**4) + 42*b**2*d**2*sin(a + b*x)**2*cos(a + b*x)*cos(c + d*x)**2/(27*b**5 -
120*b**3*d**2 + 48*b*d**4) + 40*b**2*d**2*sin(c + d*x)**2*cos(a + b*x)**3/(27*b**5 - 120*b**3*d**2 + 48*b*d**4
) + 40*b**2*d**2*cos(a + b*x)**3*cos(c + d*x)**2/(27*b**5 - 120*b**3*d**2 + 48*b*d**4) - 24*b*d**3*sin(a + b*x
)**3*sin(c + d*x)*cos(c + d*x)/(27*b**5 - 120*b**3*d**2 + 48*b*d**4) - 24*d**4*sin(a + b*x)**2*sin(c + d*x)**2
*cos(a + b*x)/(27*b**5 - 120*b**3*d**2 + 48*b*d**4) - 24*d**4*sin(a + b*x)**2*cos(a + b*x)*cos(c + d*x)**2/(27
*b**5 - 120*b**3*d**2 + 48*b*d**4) - 16*d**4*sin(c + d*x)**2*cos(a + b*x)**3/(27*b**5 - 120*b**3*d**2 + 48*b*d
**4) - 16*d**4*cos(a + b*x)**3*cos(c + d*x)**2/(27*b**5 - 120*b**3*d**2 + 48*b*d**4), True))

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1360 vs. \(2 (126) = 252\).

Time = 0.31 (sec) , antiderivative size = 1360, normalized size of antiderivative = 9.86 \[ \int \sin ^3(a+b x) \sin ^2(c+d x) \, dx=\text {Too large to display} \]

[In]

integrate(sin(b*x+a)^3*sin(d*x+c)^2,x, algorithm="maxima")

[Out]

-1/96*(3*(3*b^4*cos(2*c) - 2*b^3*d*cos(2*c) - 12*b^2*d^2*cos(2*c) + 8*b*d^3*cos(2*c))*cos((3*b + 2*d)*x + 3*a
+ 4*c) + 3*(3*b^4*cos(2*c) - 2*b^3*d*cos(2*c) - 12*b^2*d^2*cos(2*c) + 8*b*d^3*cos(2*c))*cos((3*b + 2*d)*x + 3*
a) + 3*(3*b^4*cos(2*c) + 2*b^3*d*cos(2*c) - 12*b^2*d^2*cos(2*c) - 8*b*d^3*cos(2*c))*cos(-(3*b - 2*d)*x - 3*a +
 4*c) + 3*(3*b^4*cos(2*c) + 2*b^3*d*cos(2*c) - 12*b^2*d^2*cos(2*c) - 8*b*d^3*cos(2*c))*cos(-(3*b - 2*d)*x - 3*
a) - 9*(9*b^4*cos(2*c) - 18*b^3*d*cos(2*c) - 4*b^2*d^2*cos(2*c) + 8*b*d^3*cos(2*c))*cos((b + 2*d)*x + a + 4*c)
 - 9*(9*b^4*cos(2*c) - 18*b^3*d*cos(2*c) - 4*b^2*d^2*cos(2*c) + 8*b*d^3*cos(2*c))*cos((b + 2*d)*x + a) - 9*(9*
b^4*cos(2*c) + 18*b^3*d*cos(2*c) - 4*b^2*d^2*cos(2*c) - 8*b*d^3*cos(2*c))*cos(-(b - 2*d)*x - a + 4*c) - 9*(9*b
^4*cos(2*c) + 18*b^3*d*cos(2*c) - 4*b^2*d^2*cos(2*c) - 8*b*d^3*cos(2*c))*cos(-(b - 2*d)*x - a) - 2*(9*b^4*cos(
2*c) - 40*b^2*d^2*cos(2*c) + 16*d^4*cos(2*c))*cos(3*b*x + 3*a + 2*c) - 2*(9*b^4*cos(2*c) - 40*b^2*d^2*cos(2*c)
 + 16*d^4*cos(2*c))*cos(3*b*x + 3*a - 2*c) + 18*(9*b^4*cos(2*c) - 40*b^2*d^2*cos(2*c) + 16*d^4*cos(2*c))*cos(b
*x + a + 2*c) + 18*(9*b^4*cos(2*c) - 40*b^2*d^2*cos(2*c) + 16*d^4*cos(2*c))*cos(b*x + a - 2*c) + 3*(3*b^4*sin(
2*c) - 2*b^3*d*sin(2*c) - 12*b^2*d^2*sin(2*c) + 8*b*d^3*sin(2*c))*sin((3*b + 2*d)*x + 3*a + 4*c) - 3*(3*b^4*si
n(2*c) - 2*b^3*d*sin(2*c) - 12*b^2*d^2*sin(2*c) + 8*b*d^3*sin(2*c))*sin((3*b + 2*d)*x + 3*a) + 3*(3*b^4*sin(2*
c) + 2*b^3*d*sin(2*c) - 12*b^2*d^2*sin(2*c) - 8*b*d^3*sin(2*c))*sin(-(3*b - 2*d)*x - 3*a + 4*c) - 3*(3*b^4*sin
(2*c) + 2*b^3*d*sin(2*c) - 12*b^2*d^2*sin(2*c) - 8*b*d^3*sin(2*c))*sin(-(3*b - 2*d)*x - 3*a) - 9*(9*b^4*sin(2*
c) - 18*b^3*d*sin(2*c) - 4*b^2*d^2*sin(2*c) + 8*b*d^3*sin(2*c))*sin((b + 2*d)*x + a + 4*c) + 9*(9*b^4*sin(2*c)
 - 18*b^3*d*sin(2*c) - 4*b^2*d^2*sin(2*c) + 8*b*d^3*sin(2*c))*sin((b + 2*d)*x + a) - 9*(9*b^4*sin(2*c) + 18*b^
3*d*sin(2*c) - 4*b^2*d^2*sin(2*c) - 8*b*d^3*sin(2*c))*sin(-(b - 2*d)*x - a + 4*c) + 9*(9*b^4*sin(2*c) + 18*b^3
*d*sin(2*c) - 4*b^2*d^2*sin(2*c) - 8*b*d^3*sin(2*c))*sin(-(b - 2*d)*x - a) - 2*(9*b^4*sin(2*c) - 40*b^2*d^2*si
n(2*c) + 16*d^4*sin(2*c))*sin(3*b*x + 3*a + 2*c) + 2*(9*b^4*sin(2*c) - 40*b^2*d^2*sin(2*c) + 16*d^4*sin(2*c))*
sin(3*b*x + 3*a - 2*c) + 18*(9*b^4*sin(2*c) - 40*b^2*d^2*sin(2*c) + 16*d^4*sin(2*c))*sin(b*x + a + 2*c) - 18*(
9*b^4*sin(2*c) - 40*b^2*d^2*sin(2*c) + 16*d^4*sin(2*c))*sin(b*x + a - 2*c))/(9*b^5*cos(2*c)^2 + 9*b^5*sin(2*c)
^2 + 16*(b*cos(2*c)^2 + b*sin(2*c)^2)*d^4 - 40*(b^3*cos(2*c)^2 + b^3*sin(2*c)^2)*d^2)

Giac [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 124, normalized size of antiderivative = 0.90 \[ \int \sin ^3(a+b x) \sin ^2(c+d x) \, dx=-\frac {\cos \left (3 \, b x + 2 \, d x + 3 \, a + 2 \, c\right )}{16 \, {\left (3 \, b + 2 \, d\right )}} - \frac {\cos \left (3 \, b x - 2 \, d x + 3 \, a - 2 \, c\right )}{16 \, {\left (3 \, b - 2 \, d\right )}} + \frac {\cos \left (3 \, b x + 3 \, a\right )}{24 \, b} + \frac {3 \, \cos \left (b x + 2 \, d x + a + 2 \, c\right )}{16 \, {\left (b + 2 \, d\right )}} + \frac {3 \, \cos \left (b x - 2 \, d x + a - 2 \, c\right )}{16 \, {\left (b - 2 \, d\right )}} - \frac {3 \, \cos \left (b x + a\right )}{8 \, b} \]

[In]

integrate(sin(b*x+a)^3*sin(d*x+c)^2,x, algorithm="giac")

[Out]

-1/16*cos(3*b*x + 2*d*x + 3*a + 2*c)/(3*b + 2*d) - 1/16*cos(3*b*x - 2*d*x + 3*a - 2*c)/(3*b - 2*d) + 1/24*cos(
3*b*x + 3*a)/b + 3/16*cos(b*x + 2*d*x + a + 2*c)/(b + 2*d) + 3/16*cos(b*x - 2*d*x + a - 2*c)/(b - 2*d) - 3/8*c
os(b*x + a)/b

Mupad [B] (verification not implemented)

Time = 23.52 (sec) , antiderivative size = 437, normalized size of antiderivative = 3.17 \[ \int \sin ^3(a+b x) \sin ^2(c+d x) \, dx=\frac {81\,b^4\,\cos \left (a-2\,c+b\,x-2\,d\,x\right )+81\,b^4\,\cos \left (a+2\,c+b\,x+2\,d\,x\right )-162\,b^4\,\cos \left (a+b\,x\right )-288\,d^4\,\cos \left (a+b\,x\right )-9\,b^4\,\cos \left (3\,a-2\,c+3\,b\,x-2\,d\,x\right )-9\,b^4\,\cos \left (3\,a+2\,c+3\,b\,x+2\,d\,x\right )+18\,b^4\,\cos \left (3\,a+3\,b\,x\right )+32\,d^4\,\cos \left (3\,a+3\,b\,x\right )+24\,b\,d^3\,\cos \left (3\,a-2\,c+3\,b\,x-2\,d\,x\right )-24\,b\,d^3\,\cos \left (3\,a+2\,c+3\,b\,x+2\,d\,x\right )-6\,b^3\,d\,\cos \left (3\,a-2\,c+3\,b\,x-2\,d\,x\right )+6\,b^3\,d\,\cos \left (3\,a+2\,c+3\,b\,x+2\,d\,x\right )-36\,b^2\,d^2\,\cos \left (a-2\,c+b\,x-2\,d\,x\right )-36\,b^2\,d^2\,\cos \left (a+2\,c+b\,x+2\,d\,x\right )+720\,b^2\,d^2\,\cos \left (a+b\,x\right )+36\,b^2\,d^2\,\cos \left (3\,a-2\,c+3\,b\,x-2\,d\,x\right )+36\,b^2\,d^2\,\cos \left (3\,a+2\,c+3\,b\,x+2\,d\,x\right )-80\,b^2\,d^2\,\cos \left (3\,a+3\,b\,x\right )-72\,b\,d^3\,\cos \left (a-2\,c+b\,x-2\,d\,x\right )+72\,b\,d^3\,\cos \left (a+2\,c+b\,x+2\,d\,x\right )+162\,b^3\,d\,\cos \left (a-2\,c+b\,x-2\,d\,x\right )-162\,b^3\,d\,\cos \left (a+2\,c+b\,x+2\,d\,x\right )}{48\,\left (9\,b^5-40\,b^3\,d^2+16\,b\,d^4\right )} \]

[In]

int(sin(a + b*x)^3*sin(c + d*x)^2,x)

[Out]

(81*b^4*cos(a - 2*c + b*x - 2*d*x) + 81*b^4*cos(a + 2*c + b*x + 2*d*x) - 162*b^4*cos(a + b*x) - 288*d^4*cos(a
+ b*x) - 9*b^4*cos(3*a - 2*c + 3*b*x - 2*d*x) - 9*b^4*cos(3*a + 2*c + 3*b*x + 2*d*x) + 18*b^4*cos(3*a + 3*b*x)
 + 32*d^4*cos(3*a + 3*b*x) + 24*b*d^3*cos(3*a - 2*c + 3*b*x - 2*d*x) - 24*b*d^3*cos(3*a + 2*c + 3*b*x + 2*d*x)
 - 6*b^3*d*cos(3*a - 2*c + 3*b*x - 2*d*x) + 6*b^3*d*cos(3*a + 2*c + 3*b*x + 2*d*x) - 36*b^2*d^2*cos(a - 2*c +
b*x - 2*d*x) - 36*b^2*d^2*cos(a + 2*c + b*x + 2*d*x) + 720*b^2*d^2*cos(a + b*x) + 36*b^2*d^2*cos(3*a - 2*c + 3
*b*x - 2*d*x) + 36*b^2*d^2*cos(3*a + 2*c + 3*b*x + 2*d*x) - 80*b^2*d^2*cos(3*a + 3*b*x) - 72*b*d^3*cos(a - 2*c
 + b*x - 2*d*x) + 72*b*d^3*cos(a + 2*c + b*x + 2*d*x) + 162*b^3*d*cos(a - 2*c + b*x - 2*d*x) - 162*b^3*d*cos(a
 + 2*c + b*x + 2*d*x))/(48*(16*b*d^4 + 9*b^5 - 40*b^3*d^2))